/*
 * File Created: 2019-12-04 17:28:03
 * Author: 余保林 (yubaolin6@outlook.com)
 * Desc: 统计报表相关接口
 * Last Modified: 2019-12-04 17:28:16
 * Modified By: 余保林 (yubaolin6@outlook.com>)
 */

import request from '@/utils/request'

/**
 * 渠道商销售权益统计
 *
 * @export
 * @param {*} params
 * @returns
 */
export function privilegeChannelCount(params) {
  return request.get('/platform/report/chanel/privilege/product/sales/total', { params })
}

/**
 * 权益销售总量统计
 *
 * @export
 * @param {*} params
 * @returns
 */
export function privilegeProductSaleCount(params) {
  return request.get(`/platform/report/privilege/product/sales/total`, { params })
}

/**
 *  权益销售总量统计-明细
 *
 * @export
 * @param {*} params
 * @returns
 */
export function privilegeProductSaleDetail(params) {
  return request.get(`/platform/report/privilege/product/sale/details`, { params })
}

/**
 * 权益销售总量统计-订单详情
 *
 * @export
 * @param {*} id
 * @returns
 */
export function privilegeOrderDetail(id) {
  return request.get(`/platform/privilege/order/item?id=${id}`)
}

// 兑换权益统计
export function exchangeCodeTotal(params) {
  return request.get('/platform/report/exchange/total', { params })
}

/**
 * 查看某一天兑换记录详情
 *
 * @export
 * @returns
 */
export function exchangeCodeByDate(params) {
  return request.get(`/platform/report/exchange/detail`, {params})
}

/**
 * 提现统计
 *
 * @export
 * @param {*} params
 * @returns
 */
export function withdrawTotal(params) {
  return request.get(`/platform/report/withdraw/total`, {params})
}

/**
 * 电影订单统计
 *
 * @export
 * @param {*} params
 * @returns
 */
export function movieOrder(params) {
  return request.get(`/platform/report/movie-order`, {params})
}